<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<meta name="keywords" content="微雨" />
	<meta name="description" content="微雨-基于声音的社交应用" />
	<title>微雨-基于声音的社交应用</title>
	<script src="jquery-1.6.js"></script>
	<script src="onscroll.js"></script>
	<link rel="stylesheet" type="text/css" href="css/weiyu.css" />
</head>
<body >
	<div class="wrap ">
		<div class="header">
			<a class="logo" href="#">微雨</a>
			<span class="title">基于声音的社交应用</span>
		</div>
		<div class="banner bg1">
			<div class="app_box">
				<!-- 登陆 -->
				<div class="login_box">
					<!-- <a class="ioginsn"></a>
					<a class="ioginqq"></a> -->
					<a class="ioginsn_ed"></a>
					<a class="ioginqq_ed"></a>
				</div>
				<!-- 歌词 -->
				<div class="lcr_box">
					<!-- 歌名&喜欢 -->
					<div class="title">
						<div class="fn_right shenqu"></div>
						<!-- <div class="fn_right shenqu_ed">333</div> -->
						<!-- <div class="fn_right loveit " title="I love it">
							55
						</div> -->
						<div class="fn_right loveit_ed" title="I love it">
							555+
						</div>
					</div>
					<!-- 歌词 -->
					<div class="lcrs">
						<div class='lcrs_str'>
						<p>有一颗软糖，
						有一天，
						它走着走着，
						它就死了，
						有一颗软糖，
						有一天，
						它走着走着，
						它就死了，</p>
						</div>
					</div>	
				</div>
				<!-- 某人的呻吟 -->
				<div class="playsomeone">
					<!-- 播放盒子1 -->
					<div class="fn_right misuc_box2" url='http://infinitinb.net/COFFdD0xMzY2ODkzMjE5Jmk9MTgzLjYzLjgyLjE1MCZ1PVNvbmdzL3YxL2ZhaW50UUMvZWYvMjJiODA4NjViMjg3N2Y5ZjQxYTljNGY1MDc1Yjg1ZWYubXAzJm09YTE3MzViZjQ1NDY1NmE0MTQxNjY4YjBkYWQzM2EwMDQmdj1saXN0ZW4mbj3WwsfgtLomcz3N9bfGJnA9cw==.mp3' long=''>
						
						<a class="fn_right playing"></a>
						<span class='timedic'>
						<span class="misuc_boxover"></span>
					</div>
					<!-- 进度条 -->

					<div class="speed_box">
						<div class="speeds" style="width:20%"></div>
					</div>
					<p>
						<span class="fn_right playNum">11次播放</span>
						<span class='v_time' >2012-11-25</span>
					</p>

					<div class="user">
						<a class="fn_right seed_m" target="_blank">下载客户端吧</a>
						<span class="age">24</span>
						<span class='nickname'>屎忽开花</span>
					</div>
					<!-- 录制呻吟的盒子 -->
					<div class="seed_box">
						<a class=" " target="_blank">下载客户端吧</a>
						<input type="text" placeholder="说点什么..." />
						<a class=" " target="_blank">下载客户端吧</a>
					</div>
				</div>
				<p class="title_b">
					想回应？<a href="" target="_blank">下载客户端吧</a>
				</p>
				<ul class="others">
				</ul>
				<a class="more_others">加载更多评论</a>
			</div>
		</div>

		<div class="footer shadow1">
			<p>
				<a href="javascript:;">关于微雨</a>
				<a href="javascript:;">关于多益</a>
				<a href="javascript:;">服务条款</a>
				<a href="javascript:;">意见反馈</a>
			</p>
			<p class="copyright">广州多益网络科技有限公司<br/>
				<a href="http://www.miitbeian.gov.cn/state/outPortal/loginPortal.action" rel="noflow">ICP粤B2-20060723-4</a>
			</p>

		</div>
		<div id = 'Jq_player'>
			<audio id = 'Jq_audio' preload='metadata' src='http://infinitinb.net/COFFdD0xMzY2ODkzMjE5Jmk9MTgzLjYzLjgyLjE1MCZ1PVNvbmdzL3YxL2ZhaW50UUMvZWYvMjJiODA4NjViMjg3N2Y5ZjQxYTljNGY1MDc1Yjg1ZWYubXAzJm09YTE3MzViZjQ1NDY1NmE0MTQxNjY4YjBkYWQzM2EwMDQmdj1saXN0ZW4mbj3WwsfgtLomcz3N9bfGJnA9cw==.mp3'></audio>
		</div>
	</div>
	<input class='text' type='test'>
</body>
<script type='text/javascript'>
var ua =  window.navigator.userAgent.toLowerCase,ie,FF;
if(document.all){
	ie = true;
}else{
	FF = true;
}
//请求
vid  = '255db90cd5b6491d';
// $.getJSON( 'http://183.61.80.212:8099/voice.aspx?act=voicedetail&vid=255db90cd5b6491d', function(data) { alert(data) })
// execute(vid,function(data){
// 	alert(data)
// })
var arr = {"sex":1,"upnum":14,"vtime":"2013-4-19 18:12:48","birthday":"1994-4-17 0:00:00","downnum":0,"vtype":1,"playnum":3,"vlong":7,"title":"肥仔米","godnum":3,"desc":"附近的收拾.。...。.房间开，始放假时，间方可立即付，款时间防护技术的环境卡死按实际，分开杀害事件。放假撒空间。","postuser":8522082,"nickname":"纯情小火种"};
function setParam(arr){
	$('.v_time').html(arr.vtime);
	if(arr.sex == 1) $('.age').addClass('age_b');
	else $('.age').addClass('age_g');
	//年龄
	var NowDate = new Date();
	var B = arr.birthday.split("-");

	age = (NowDate.getFullYear()-parseInt(B[0]));
	$('.age').html(age);
	$('.nickname').html(arr.nickname)
	$('.playNum').html(arr.playnum+'次播放');
	$('.misuc_box2').attr('long',arr.vlong);
	str = arr.desc//.replace(/，/ig,'，<br>').replace(/,/ig,',<br>')
	$('.lcrs_str p').html(str);//死肥仔
	upnumStr = (arr.upnum>999)?'999+':arr.upnum ;
	$('.loveit_ed').html(upnumStr);

}
setParam(arr);
//调用评论



function addMsg(pageindex,vid){
	var arrDiscuss  = [{"nickname":"神一样的存在","havevoice":1,"vlong":2,"cguid":"79aab054748644e3","uid":8524071,"content":"u他人人人人吞吞吐吐","commenttime":"2013-4-22 19:46:52"},{"nickname":"神一样的存在","havevoice":1,"vlong":3,"cguid":"3df6ee9fe7264f41","uid":8524071,"content":"","commenttime":"2013-4-17 17:53:18"},{"nickname":"黄灿灿","havevoice":0,"vlong":-1,"cguid":"40bb69ba62f54cc9","uid":8523057,"content":" 非典过后#26","commenttime":"2013-4-11 20:13:07"},{"nickname":"黄灿灿","havevoice":1,"vlong":2,"cguid":"c6afddaa826a401b","uid":8523057,"content":"通通透透热热","commenttime":"2013-4-10 13:14:17"},{"nickname":"黄灿灿","havevoice":1,"vlong":2,"cguid":"bf7a015409b34590","uid":8523057,"content":"广泛发动分分合合鱼丸#74#19#71#23","commenttime":"2013-4-10 13:12:03"},{"nickname":"神一样的存在","havevoice":0,"vlong":-1,"cguid":"830262e695434709","uid":8524071,"content":"受到撒地方受到放萨达发生大幅度上发生地方首都发生地方但是发生的方式都发生的负担收费","commenttime":"2013-4-8 14:57:57"},{"nickname":"神一样的存在","havevoice":0,"vlong":-1,"cguid":"92a8cea7f5134802","uid":8524071,"content":"考试的飞机","commenttime":"2013-4-7 18:01:26"},{"nickname":"神一样的存在","havevoice":0,"vlong":-1,"cguid":"26c490295067497f","uid":8524071,"content":"广告费","commenttime":"2013-4-7 17:49:10"},{"nickname":"神一样的存在","havevoice":0,"vlong":-1,"cguid":"46a4013e095f4a73","uid":8524071,"content":"vjcufiufgggggfgvgg推头疼他的","commenttime":"2013-4-7 17:48:21"},{"nickname":"神一样的存在","havevoice":0,"vlong":-1,"cguid":"82b2497102624cf5","uid":8524071,"content":"阿萨德发首都发生的发生的发生的发生地方阿萨德发","commenttime":"2013-4-2 17:41:19"}];

	for(var i in arrDiscuss){
		if(arrDiscuss[i].havevoice == 1){
			//请求语音接口
			var DATASTR = new Date(arrDiscuss[i].commenttime.replace(/-/g,'/'));
			var year = DATASTR.getFullYear(),month = DATASTR.getMonth()+1,day = DATASTR.getDate();
			if(month<10) monthstr = '0'+month;
			else monthstr= month;
			if(day<10) daystr = '0'+day;
			else daystr = day;
			vtimeStr = (year+"_"+monthstr+"/"+daystr);
			//http://183.61.80.212:8099/voice.aspx?act=onlyvoice&type=wav&path=res/v/2013_04/19/2b9a0a9cd49d4a91
			$('.others').append('\
				<li><span class="time">'+arrDiscuss[i].commenttime+'</span>\
					<span>'+arrDiscuss[i].nickname+"："+arrDiscuss[i].content+'</span>\
					<div class=" misuc_box3 inline" URL=http://183.61.80.212:8099/voice.aspx?act=onlyvoice&type=wav&path=res/v/'+vtimeStr+'/'+arrDiscuss[i].cguid+'>\
						<a class="fn_right play"></a><span class="voice_time">'+arrDiscuss[i].vlong+'″</span>\
						<span class="misuc_boxover"></span>\
					</div>\
				</li>')
		}else{
			$('.others').append('\
				<li><span class="time">'+arrDiscuss[i].commenttime+'</span>\
					<span>'+arrDiscuss[i].nickname+"："+arrDiscuss[i].content+'</span>\
				</li>')
		}
	}

}


addMsg(1,213)

$(".lcrs").ready(function  (){//显示窗口层class
	$(".lcrs_str").oScroll({ //文本内容层class
	});
})
function userAgentFn(){
	var c;
	c = $('#Jq_audio').get(0);
	return c;
}
function mediaPLAYER_control(param){//播放控制
	obj = userAgentFn();
	switch (param){
		case 'play':obj.play();break;
		case 'pause':obj.pause();break;
		case 'stop':obj.stop();break;
	}
}
function percentControl(){//进度条控制
	obj = userAgentFn();
	now = obj.currentTime;
	all = obj.duration;
	return now;
}
function mediaChange(url){
	$('#Jq_audio').get(0).src = url;
}
function haveUrl(){
	url = $('#Jq_audio').get(0).src;
	return url.toString();
}
var setPercent;
$('.misuc_box2').click(function(){
	clearInterval(setPercent);
	var _url = $(this).attr('url');
	var nowUrl = haveUrl();	
	if(nowUrl!=_url){
		mediaChange(_url);
	}
	$('.playing').removeClass('playing').addClass('play');
	if($(this).attr('play')){
		$(this).attr('play',false);
		mediaPLAYER_control('pause');
		$(this).find('a').removeClass('playing').addClass('play');
	}else{
		mediaPLAYER_control('play');
		obj = userAgentFn();		
			all = $('.misuc_box2').attr('long');
			setPercent = setInterval(function(){
				wp = percentControl()/all;
				$('.text').val(percentControl())
				$('.speeds').width(wp*$('.speed_box').width());
				if(wp == 1){
					clearInterval(setPercent);
				}
			},100)
		$(this).attr('play',true);
		$(this).find('a').removeClass('play').addClass('playing');
	}
})
$('.misuc_box3').click(function(){
	clearInterval(setPercent);
	var _url = $(this).attr('url');
	var nowUrl = haveUrl();	
	if(nowUrl!=_url){
		mediaChange(_url);
	}
	$('.playing').removeClass('playing').addClass('play');
	if($(this).attr('play')){
		$(this).attr('play',false);
		mediaPLAYER_control('pause');
		$(this).find('a').removeClass('playing').addClass('play');
	}else{
		mediaPLAYER_control('play');
		obj = userAgentFn();		
		$(this).attr('play',true);
		$(this).find('a').removeClass('play').addClass('playing');
	}
})
</script>
</html>